<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>单图片上传</title>
    <script type="text/javascript" src="/resources/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript">
        function hideImg() {
            $("img").hide();
        }
    </script>
</head>
<body>
<fieldset>
    <legend>图片上传</legend>
    <h2>只能上传单张10M以下的 PNG、JPG、GIF 格式的图片</h2>
    <form action="/photoUpload" method="post" enctype="multipart/form-data">
        <input type="hidden" id="redirectPath" name="redirectPath" value="/toSysFoodImagePage">
        <div style="max-width: 100px;">文件种类：图片</div><input type="hidden" name="fileType" value="image">
        <br/>
        <div style="max-width: 100px;">图片说明：</div><input type="text" name="content" value="${content}">
        <br/>
        <div style="max-width: 100px;">关联id：</div><input type="text" name="linkId" value="${linkId}" readonly />
        <br/>
        <div style="max-width: 100px;">关联类型：菜品/套餐</div><input type="hidden" name="linkType" value="2">
        <br/>
        <div style="max-width: 100px;">是否默认：是</div><input type="hidden" name="isDefault" value="1">
        <br/>
        选择文件:<input type="file" name="file" onclick="hideImg()">
        <input type="submit" value="上传">
        <br/>
        <img id="${id}" src="${relativeUrl}">
    </form>
</fieldset>
</body>
</html>